﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections.ObjectModel;

namespace Model
{
    public static class MediaMgr
    {
        #region Properties

        public static ReadOnlyCollection<Media> Medias { get; private set; }

        #endregion

        #region Methods

        public static void Initialize()
        {
            string videoFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos);
            Medias = (from el in Directory.GetFiles(videoFolder, "*", SearchOption.AllDirectories)
                        select new Media(el)).ToList().AsReadOnly();
        }

        #endregion
    }
}
